<cp-navbar [leftArrow]="false" [border]="loading"></cp-navbar>
<div class="error" *ngIf="error"><cp-error (reload)="handleReload()"></cp-error></div>
<div class="loading" *ngIf="loading"><cp-loading></cp-loading></div>
<div class="container" *ngIf="!error && !loading">
  <cp-tab [items]="tabs" [itemWidth]="32" [active]="active" (onTabChange)="handleTabChange($event)"></cp-tab>
  <div class="content">
    <!-- 关注的楼盘 -->
    <div class="estate" [class.hide]="active !== 0">
      <div class="list" *ngIf="estate.length > 0">
        <div class="gutter"></div>
        <div
          class="item"
          *ngFor="let item1 of estate"
          routerLink="/workspace/estate/detail"
          [queryParams]="{ project: item1.Id }"
        >
          <cp-estate-item [item]="item1"></cp-estate-item>
        </div>
      </div>
      <cp-loadmore *ngIf="estate.length > 0 && !estateNomore"></cp-loadmore>
      <cp-nomore *ngIf="estate.length > 4 && estateNomore"></cp-nomore>
      <div class="empty" *ngIf="estate.length === 0"><cp-empty></cp-empty></div>
    </div>
    <!-- 关注的户型 -->
    <div class="layout" [class.hide]="active !== 1">
      <div class="list" *ngIf="layout.length > 0">
        <div class="gutter"></div>
        <div
          class="item"
          *ngFor="let item2 of layout"
          routerLink="/workspace/estate/typeDetail"
          [queryParams]="{ layout: item2.Id }"
        >
          <cp-estate-type2 [item]="item2"></cp-estate-type2>
        </div>
      </div>
      <cp-loadmore *ngIf="layout.length > 0 && !layoutNomore"></cp-loadmore>
      <cp-nomore *ngIf="layout.length > 4 && layoutNomore"></cp-nomore>
      <div class="empty" *ngIf="layout.length === 0"><cp-empty></cp-empty></div>
    </div>
    <!-- 关注的活动 -->
    <div class="activity" [class.hide]="active !== 2">
      <div class="list" *ngIf="activity.length > 0">
        <div class="gutter"></div>
        <div
          class="item"
          *ngFor="let item3 of activity"
          routerLink="/workspace/home/activityDetail"
          [queryParams]="{ promotion: item3.Id }"
        >
          <div class="top">
            <span class="tag">{{ item3.Category | estateActType }}</span> <span class="txt">{{ item3.Title }}</span>
          </div>
          <div class="bottom">
            <div class="desc">{{ item3.Description }}</div>
            <div class="space-between">
              <span class="time">活动时间至{{ item3.End }}</span> <span class="join">{{ item3.Join }}人已报名</span>
            </div>
            <p class="project">{{ item3.Project }}</p>
          </div>
        </div>
      </div>
      <cp-loadmore *ngIf="activity.length > 0 && !activityNomore"></cp-loadmore>
      <cp-nomore *ngIf="activity.length > 4 && activityNomore"></cp-nomore>
      <div class="empty" *ngIf="activity.length === 0"><cp-empty></cp-empty></div>
    </div>
  </div>
</div>
<cp-tabbar></cp-tabbar>
